package com.luo.shop.controller.admin;

import com.luo.shop.service.admin.CommentAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("admin/comment")
public class CommentAdminController {
    @Autowired
    private CommentAdminService commentAdminService;

    /**
     * 删除评论信息
     * @param id
     * @return
     */
    @GetMapping("delete")
    @ResponseBody
    public String delete(Long id){
        Integer delete = commentAdminService.delete(id);
        if (delete>0){
            return "ok";
        }
        return "error";
    }

}
